package cn.pzhu.controller.web;

import cn.pzhu.controller.BaseController;
import cn.pzhu.model.Achievement;
import cn.pzhu.model.Demand;
import cn.pzhu.services.web.WebAcheievementServices;
import cn.pzhu.services.web.WebDemandServices;
import com.jfinal.render.JspRender;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * Created by dongp on 2016/4/22.
 *
 * 前台首页
 */
public class IndexController extends BaseController {

    private WebAcheievementServices webAS = new WebAcheievementServices();
    private WebDemandServices webDm = new WebDemandServices();

    public void index() {
        List<Achievement> achievements = webAS.querySix();
        setAttr("achievements", achievements);
        List<Demand> demands = webDm.querySix();
        setAttr("demands",demands);
        render("index.jsp");
    }
}
